package dq.study.designmodel.factory;

import dq.study.designmodel.factory.abstractFactory.AbstractFactory;
import dq.study.designmodel.factory.abstractFactory.LolitaFactory;
import dq.study.designmodel.factory.abstractFactory.RoyalFactory;
import dq.study.designmodel.factory.model.vehicle.Vehicle;
import dq.study.designmodel.factory.simple.CarFactory;
import dq.study.designmodel.factory.simple.Factory;

/**
 * @author dongqun
 * @Description: 测试简单工厂
 * @date 2019/3/20 22:36
 */
public class Client {
    public static void main(String[] args){
        //测试简单工厂
        Factory factory = new CarFactory();
        Vehicle vehicle = factory.create();
        vehicle.go();
        //测试抽象工厂
        AbstractFactory abstractFactory = new LolitaFactory();
        abstractFactory.createFood().what();
        abstractFactory.createVehicle().go();
    }
}
